package com.zhentao.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 单据主表
 * @TableName yd_depot_head
 */
@TableName(value ="yd_depot_head")
@Data
public class YdDepotHead implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 类型(出库/入库)
     */
    @TableField(value = "type")
    private String type;

    /**
     * 出入库分类
     */
    @TableField(value = "sub_type")
    private String subType;

    /**
     * 初始票据号
     */
    @TableField(value = "default_number")
    private String defaultNumber;

    /**
     * 票据号
     */
    @TableField(value = "number")
    private String number;

    @TableField(exist = false)
    private Integer operNumber;
    @TableField(exist = false)
    private String supplier;
    @TableField(exist = false)
    private String name;



    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 出入库时间
     */
    @TableField(value = "oper_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date operTime;

    /**
     * 供应商id
     */
    @TableField(value = "organ_id")
    private Long organId;

    /**
     * 操作员
     */
    @TableField(value = "creator")
    private Long creator;

    /**
     * 账户id
     */
    @TableField(value = "account_id")
    private Long accountId;

    /**
     * 变动金额(收款/付款)
     */
    @TableField(value = "change_amount")
    private BigDecimal changeAmount;

    /**
     * 找零金额
     */
    @TableField(value = "back_amount")
    private BigDecimal backAmount;

    /**
     * 合计金额
     */
    @TableField(value = "total_price")
    private BigDecimal totalPrice;

    /**
     * 付款类型(现金、记账等)
     */
    @TableField(value = "pay_type")
    private String payType;

    /**
     * 单据类型
     */
    @TableField(value = "bill_type")
    private String billType;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 附件名称
     */
    @TableField(value = "file_name")
    private String fileName;

    /**
     * 销售员（可以多个）
     */
    @TableField(value = "sales_man")
    private String salesMan;

    /**
     * 多账户ID列表
     */
    @TableField(value = "account_id_list")
    private String accountIdList;

    /**
     * 多账户金额列表
     */
    @TableField(value = "account_money_list")
    private String accountMoneyList;

    /**
     * 优惠率
     */
    @TableField(value = "discount")
    private BigDecimal discount;

    /**
     * 优惠金额
     */
    @TableField(value = "discount_money")
    private BigDecimal discountMoney;

    /**
     * 优惠后金额
     */
    @TableField(value = "discount_last_money")
    private BigDecimal discountLastMoney;

    /**
     * 销售或采购费用合计
     */
    @TableField(value = "other_money")
    private BigDecimal otherMoney;

    /**
     * 订金
     */
    @TableField(value = "deposit")
    private BigDecimal deposit;

    /**
     * 状态，0未审核、1已审核、2完成采购|销售、3部分采购|销售、9审核中
     */
    @TableField(value = "status")
    private String status;

    /**
     * 采购状态，0未采购、2完成采购、3部分采购
     */
    @TableField(value = "purchase_status")
    private String purchaseStatus;

    /**
     * 关联订单号
     */
    @TableField(value = "link_number")
    private String linkNumber;

    /**
     * 租户id
     */
    @TableField(value = "tenant_id")
    private Long tenantId;

    /**
     * 删除标记，0未删除，1删除
     */
    @TableField(value = "delete_flag")
    private String deleteFlag;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}